I know several variations of this question have been asked. But, I haven't been able to find a solution for this particular case. Apologies in advance if I've overlooked something.
I'm getting the following error:
Unexpected token, expected "," (25:25)
function render( basename:string ) {
^
Here's the function that is being pointed to in index.tsx:
function render( basename:string ) {
ReactDOM.render(
<StrictMode>
<Router basename={basename}>
...
</Router>
</StrictMode>,
document.getElementById(target),
);
};
One thing to note, the red error line doesn't show up in the code. It just breaks with the above error when trying to serve my UI container. I'm using webpack to serve using a few plugins in my webpack.config.js. I have typescript installed. I'm wondering if this is a linter error?
Here's the local tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es2020",
"jsx": "react-jsx",
"types": ["jest", "cypress", "@testing-library/cypress", "@testing-library/jest-dom"]
},
"include": ["src", "test", "webpack.config.js", "jest.config.js", "babel.config.js"]
}
... which extends
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
edit: .eslintrc.json
{
"env": {
"node": true,
"cypress/globals": true
},
"extends": ["plugin:cypress/recommended"],
"plugins": ["cypress"]
}